stubdom: fix lwip compile
authorOlaf Hering <olaf@aepfle.de>
Mon, 22 Sep 2014 12:59:50 +0000 (14:59 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 23 Sep 2014 09:11:55 +0000 (10:11 +0100)
commit66f71ce61ed41b8b0ae47f13c7a92c2d5c0574a0
tree41cb26d922391020cd4f2cf074bbffc153266864
parente01fa4e223fc077e18936d890dbd4813c3e7c9b1
stubdom: fix lwip compile

stubdom/lwip-x86_64/src/core/dhcp.c: In function 'dhcp_create_request':
stubdom/lwip-x86_64/src/core/dhcp.c:1359:71: error: array subscript is above array bounds [-Werror=array-bounds]
     dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/;

gcc can not know if hwaddr_len exceeds the hwaddr array size,
so force an upper limit to assist gcc.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
stubdom/Makefile
stubdom/lwip.dhcp_create_request-hwaddr_len.patch [new file with mode: 0644]